<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterActivityDeliveriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('activity_deliveries')) {
            Schema::table('activity_deliveries', function (Blueprint $table) {
                $table->string('act_id')->default("0")->comment("关联活动id");//关联活动id
                $table->string('act_name')->comment("关联活动名称");//关联活动名称s
                $table->string('img_url')->comment("投放图片");//投放图片
                $table->integer('begin_time')->comment("投放开始时间");//投放开始时间
                $table->integer('end_time')->comment("投放结束时间");//投放结束时间
                $table->integer('act_type')->default(2)->comment("活动类型 1-列表活动 2-自有活动");//活动类型
                $table->integer('target')->default(1)->comment("触发用户 1-所有用户 2-性别 3-省份");
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
